﻿// <copyright file="ManagedCardClaim.cs" company="SharpSTS">
// Copyright (c) 2007, 2008 All Right Reserved, http://sharpsts.com/
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Barry Dorrans</author>
// <email>barryd@idunno.org</email>
// <date>2008-06-13</date>
// <summary>Provides a representation of a managed card claim.</summary>

namespace SharpSTS.CardControl
{
    using System.Runtime.Serialization;

    /// <summary>
    /// Represents a claim in a managed card.
    /// </summary>
    [DataContract(Name = "SupportedClaim", Namespace = Constants.Namespaces.Data)]
    public sealed class ManagedCardClaim
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ManagedCardClaim"/> class.
        /// </summary>
        public ManagedCardClaim()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ManagedCardClaim"/> class.
        /// </summary>
        /// <param name="uri">The claim URI.</param>
        /// <param name="description">The claim description.</param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage(
            "Microsoft.Design", 
            "CA1054:UriParametersShouldNotBeStrings", 
            MessageId = "0#",
            Justification = "This comes from a SOAP message, and does not need to be a URI object.")]
        public ManagedCardClaim(string uri, string description)
        {
            this.Uri = uri;
            this.Description = description;
        }

        /// <summary>
        /// Gets or sets the URI for the claim.
        /// </summary>
        /// <value>The URI for the claim.</value>
        [System.Diagnostics.CodeAnalysis.SuppressMessage(
            "Microsoft.Design", 
            "CA1056:UriPropertiesShouldNotBeStrings", 
            Justification = "This comes from a SOAP message, and does not need to be a URI object.")]
        [DataMember(Order = 1, IsRequired = true)]
        public string Uri
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the description for the claim.
        /// </summary>
        /// <value>The description for the claim.</value>
        [DataMember(Order = 2, IsRequired = true)]
        public string Description
        {
            get;
            set;
        }
    }
}
